package collection

import "soluty.cc/go/godash/types"

func ForEach(array []T, iteratee types.Predicate) {
	for index, value := range array {
		if !iteratee(value, index, array) {
			return
		}
	}
}
